The objective of the present invention is to solve the aforementioned problems of the prior art by providing a type of semiconductor device, as well as its inspection method, characterized by the fact that in a photodiode comprising a pn junction and containing an intrinsic layer or the like, the presence/absence of an inversion layer formed in the outer layer portion of the intrinsic layer can be detected before assembly of the package.